package com.example.visiter;

import com.example.visiter.service.Computer;
import com.example.visiter.service.impl.PersonVisitor;

public class Main {

    public static void main(String[] args) {
        PersonVisitor personVisitor=new PersonVisitor();
        Computer computer = new Computer();
        computer.accept(personVisitor);
        double totalPrice = personVisitor.getTotalPrice();
        System.out.println(totalPrice);
    }
}
